import urequests

client_id = "9332ee385d744bce8202482d54551fd4"


def notify_we_chat(message: str):
    response = None
    try:
        we_chat_uri = "https://apis.bemfa.com/vb/wechat/v1/wechatAlertJson"
        header = {"Content-Type": "application/json; charset=utf-8"}
        data = {
            "uid": client_id,
            "device": "鱼缸提醒",
            "message": message
        }
        response = urequests.post(we_chat_uri, header=header, json=data)
        response.close()
    except Exception as e:
        print(e)
    finally:
        if response:
            response.close()
